/*
 * @Author: wangdazhuang
 * @Date: 2024-10-16 17:13:03
 * @LastEditTime: 2024-10-16 17:14:43
 * @LastEditors: wangdazhuang
 * @Description: 
 * @FilePath: /chigua_app/lib/src/utils/m3u8_download/m3u8_download_notify_state.dart
 */
// 通知里面区分waiting和downloading
enum M3u8DownloadNotifyState {
  none,
  waiting,
  downloading,
  success,
  error,
  cancel,
}

extension M3u8DownloadNotifyStateExtension on M3u8DownloadNotifyState {
  bool get isNone => this == M3u8DownloadNotifyState.none;
  bool get isWaiting => this == M3u8DownloadNotifyState.waiting;
  bool get isDownloading => this == M3u8DownloadNotifyState.downloading;
  bool get isFinished => isSuccess || isFail;
  bool get isSuccess => this == M3u8DownloadNotifyState.success;
  bool get isError => this == M3u8DownloadNotifyState.error;
  bool get isCancel => this == M3u8DownloadNotifyState.cancel;
  bool get isFail => isError || isCancel;
}
